SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 69398: Running DS2 code against long data types on SAS® Federation Server 4.4 with VARCHAR exceeding 1024 (Linux)/4096 (Windows) causes an access violation

DetailsHotfixAboutRate It

You might encounter an issue in which running DS2 code against long data types on SAS Federation Server 4.4 with a VARCHAR data type that exceeds 1,024 characters in Linux environments and 4,096 characters in Windows environments causes an access violation.

For example, you encounter the issue when you complete the following steps:

  1. Create a table using code similar to the following in Microsoft SQL Server database (assuming the DSN points to a database named "sas"):
proc sql;
connect to odbc (dsn="<MS SQL Server DSN>" user="<userid>" pw="<password>");
execute (
CREATE TABLE [dbo].[TestVCMID]
(
ID INT IDENTITY(1, 1) ,
TestData VARCHAR(MAX) ,
PRIMARY KEY CLUSTERED ( ID )
)
) by odbc;
execute (DECLARE @str1 VARCHAR(MAX) = 'a'
INSERT INTO [dbo].[TestVCMID]
( TestData )
SELECT REPLICATE(@str1, 8192)
) by odbc;

quit;
  1. Run DS2 code similar to the following on SAS Federation Server 4.4 against a table similar to the one in step 1:
proc ds2 nolibs noprompt="driver=remts;server='<Federation Server host>';port=24141;
protocol=bridge;uid='<userid>';pwd='<password>';conopts=(driver=ds2;
conopts=(driver=sql;conopts=(DSN=DSFEDERATEDDSN)))";
data null;
dcl int ID;
dcl varchar(10) value;
dcl int i;
dcl int rc;
dcl varchar(8192) TestData;
dcl int ID;
dcl package sqlstmt query('select ID, TestData from "sas"."dbo"."TestVCMID" where ID = ?', [value]);
method run();
    this.value = 1;
    rc = query.execute();
    if (rc = 0) then do;
      rc = query.bindResults([ID, TestData]);
      rc = query.fetch();
      put ID=;
      put TestData=;
    end;
end;
enddata;
run; quit;

In this scenario, the following error message occurs:

ERROR: Access violation

The same issue occurs when you use a CLOB data type in Oracle.

The only workaround is to use a VARCHAR data type with a fixed length within the queried database table.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Federation ServerMicrosoft® Windows® for x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise 32-bit4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro 32-bit4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise 32-bit4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro 32-bit4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 104.44.59.4 TS1M79.4 TS1M8
Microsoft Windows 114.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 20084.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2008 R24.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2008 for x644.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Datacenter4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 R2 Datacenter4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 R2 Std4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Std4.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 20164.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 20194.44.59.4 TS1M79.4 TS1M8
Microsoft Windows Server 20224.44.59.4 TS1M79.4 TS1M8
Windows 7 Enterprise 32 bit4.44.59.4 TS1M79.4 TS1M8
Windows 7 Enterprise x644.44.59.4 TS1M79.4 TS1M8
Windows 7 Home Premium 32 bit4.44.59.4 TS1M79.4 TS1M8
Windows 7 Home Premium x644.44.59.4 TS1M79.4 TS1M8
Windows 7 Professional 32 bit4.44.59.4 TS1M79.4 TS1M8
Windows 7 Professional x644.44.59.4 TS1M79.4 TS1M8
Windows 7 Ultimate 32 bit4.44.59.4 TS1M79.4 TS1M8
Windows 7 Ultimate x644.44.59.4 TS1M79.4 TS1M8
64-bit Enabled AIX4.44.59.4 TS1M79.4 TS1M8
64-bit Enabled Solaris4.44.59.4 TS1M79.4 TS1M8
HP-UX IPF4.44.59.4 TS1M79.4 TS1M8
Linux for x644.44.59.4 TS1M79.4 TS1M8
Solaris for x644.44.59.4 TS1M79.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.